package com.icehand.payment.config;

import com.icehand.wechat.app.WechatAppHelper;
import com.icehand.wechat.js.WechatJsHelper;
import com.icehand.wechat.mini.WechatMiniHelper;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author icehand
 */
@Configuration
public class WechatConfiguration {

    @Bean
    public WechatAppHelper wechatAppHelper(RestTemplate restTemplate){
        return new WechatAppHelper(restTemplate);
    }

    @Bean
    public WechatJsHelper wechatJsHelper(RestTemplate restTemplate){
        return new WechatJsHelper(restTemplate);
    }

    @Bean
    public WechatMiniHelper wechatMiniHelper(RestTemplate restTemplate){
        return new WechatMiniHelper(restTemplate);
    }
}
